/*
 * Created by 岱青海蓝信息系统(北京)有限公司 on 17-5-17 下午12:12
 * Copyright (c) 2017. All rights reserved.
 */

package com.example.dqhl.recycleviewdemo.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.example.dqhl.recycleviewdemo.R;
import com.example.dqhl.recycleviewdemo.adapter.MyAdapter;
import com.example.dqhl.recycleviewdemo.modle.MyModle;
import com.example.dqhl.recycleviewdemo.view.ParallaxRecycleView;

import java.util.ArrayList;
import java.util.List;

/**
*description: 横向Recycleview 左滑消失
*autour:guanluocang
*date:17/5/24 15:36
*/
public class ParallaxRecycleActivity extends AppCompatActivity {

    private ParallaxRecycleView recyclerview;
    private List<MyModle> mModleList;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_parallax_recycle);
        initData();
        (recyclerview) = (ParallaxRecycleView) findViewById(R.id.recyclerview);
        recyclerview.setAdapter(new MyAdapter(this, mModleList));
    }

    private void initData() {
        mModleList = new ArrayList<>();
        for (int i = 0; i < 30; i++) {
            MyModle myModle = new MyModle();
            myModle.setId(i + "猴子是傻吊嫩");
            mModleList.add(myModle);
        }

    }
}
